mark scripts as shareable cross-origin#25380
Conversation
|
To clarify, I'm not 100% sure this is the right approach (perhaps Electron should somehow be injecting a correct origin for these scripts?) but it does fix the issue and I'm not aware of the context for deciding to mark scripts as non-cross-origin-shareable in node (if any—it seems not relevant to most non-Electron node.js use cases) |
c3cf16c to
9a21126
Compare
|
Ping @nodejs/v8. The code changes themselves LGTM, but someone more knowledgeable about V8 should weigh in. From a quick search of the codebase, |
9a21126 to
98214ca
Compare
|
Whitespace tidied. |
joyeecheung
left a comment
There was a problem hiding this comment.
LGTM. I also did this when trying to fix #11893 (but that patch involved something more breaking than this)
|
Yes. This really is just a bit set for the browser. LGTM. |
|
looks to me like the test failures are flakes? |
|
Yes, I think so. Resume CI: https://ci.nodejs.org/job/node-test-pull-request/20112/ |
|
Landed in 817218c, thanks for the PR! |
PR-URL: #25380 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This fixes an issue in Electron where errors were being incorrectly sanitized on their way to
window.onerror. e.g.was printing "Script error" instead of "Uncaught Error: hi"
This is due to origin-checking logic in Blink: https://chromium.googlesource.com/chromium/src/+/71.0.3578.123/third_party/blink/renderer/core/execution_context/execution_context.cc#114
cc @joyeecheung who is
blameon a lot of this code :)Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes